package com.zhuiYun.project.api.handworkdiycollection.service;

import com.zhuiYun.project.api.handworkdiycollection.model.HandworkDiyCollectionModel;
import com.zhuiYun.project.common.errorCode.CommonException;
import com.zhuiYun.project.common.response.CommonResult;

/**
 * @param
 * @Author yangze
 * @Description TODO 手工diy收藏service
 * @Date 2023/4/6 13:40
 * @Return
 */

public interface HandworkDiyCollectionService {
    /**
     * @param userId
     * @param diyCommodityName *
     * @Author yangze
     * @Description
     * @Date 2023/4/6 13:41
     * @Return CommonResult
     */
    CommonResult selectHandworkDiyCollectionList(Integer userId, String diyCommodityName) throws CommonException;

    /**
     * @param id
     * @Author yangze
     * @Description TODO diy商品取消收藏
     * @Date 2023/4/6 20:09
     * @Return
     */
    CommonResult deleteById(Integer id) throws CommonException;

    /**
     * @param handworkDiyCollectionModel
     * @Author yangze
     * @Description TODO 用户收藏手工diy商品
     * @Date 2023/4/10 8:53
     * @Return CommonResult
     */
    CommonResult insertHandworkDiyCollection(HandworkDiyCollectionModel handworkDiyCollectionModel);

    /**
     * @param userId,diyCommodityId
     * @Author yangze
     * @Description TODO 查询是否收藏 0未收藏 1已收藏
     * @Date 2023/4/10 10:30
     * @Return commonResult
     */
    CommonResult selectIsCollection(Integer userId, Integer diyCommodityId);

    /**
    * @Author yangze
    * @Description 根据用户id和diy商品id取消收藏
    * @Date 2023/4/10 15:19
    * @Return 
    * @param handworkDiyCollectionModel
    */
    
    CommonResult deleteByUserIdAndDiyId(HandworkDiyCollectionModel handworkDiyCollectionModel);
}
